/**
 * @author Caius
 * @description 定义xxljob的执行bean
 * @version 1.0
 * @since Created in 2025-01-17
 */

package com.itsense.stock.job;

import com.itsense.stock.service.StockTimerTaskService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class StockJob {
    @Autowired
    private StockTimerTaskService stockTimerTaskService;

    /**
     * 定时采集A股大盘信息任务
     */
    @XxlJob("getInnerMarketInfo")
    public void getStockInfos(){
        stockTimerTaskService.getInnerMarketInfo();
    }

    /**
     * 按分钟采集A股各股的信息任务
     */
    @XxlJob("getStockRtIndex")
    public void getStockRtIndex(){
        stockTimerTaskService.getStockRtIndex();
    }

    /**
     * 获取板块信息
     */
    @XxlJob("getStockSectorRtIndex")
    public void getStockSectorRtIndex(){
        stockTimerTaskService.getStockSectorRtIndex();
    }


}
